import request from '@/utils/request';

// 异常列表
export function exceptionHandling(query) {
  return request({
    url: '/cockpit/main/exceptionHandling',
    method: 'get',
    params: query
  });
}

// 处理
export function updateExceptionHandling(data) {
  return request({
    url: '/cockpit/main/exceptionHandling',
    method: 'put',
    data: data
  });
}
// 首页饼图统计
export function getEnterprisePlanning(query) {
  return request({
    url: '/energyBureau/getEnterprisePlanning',
    method: 'get',
    params: query
  });
}
// 待办
export function currentUserTable(query) {
  return request({
    url: '/system/process/task/list/currentUserTable',
    method: 'get',
    params: query
  });
}
// export function currentUserTable(query) {
//   return request({
//     url: "/system/process/task/list/currentUserTable",
//     method: "get",
//   });
// }

// 销售统计单
export function getByTicketCode(query) {
  return request({
    url: '/business/message/getAppByTicketCode',
    method: 'get',
    params: query
  });
}

// 年度销售去向省级图
export function getCustomerProvinceChart(query) {
  return request({
    url: '/business/chart/getCustomerProvinceChart',
    method: 'get',
    params: query
  });
}
// 下游企业行业占比图
export function getCustomerAttributeChart(query) {
  return request({
    url: '/business/chart/getCustomerAttributeChart',
    method: 'get',
    params: query
  });
}
// 运销计划完成进度表（月）
export function getMonthShippingSalesPlan(query) {
  return request({
    url: '/business/chart/getMonthShippingSalesPlan',
    method: 'get',
    params: query
  });
}
// 年度流向图
export function getDistrictPlan(query) {
  return request({
    url: '/business/chart/getDistrictPlan',
    method: 'get',
    params: query
  });
}
// 年度运销计划完成进度
export function getYearShippingSalesPlan(query) {
  return request({
    url: '/business/chart/getYearShippingSalesPlan',
    method: 'get',
    params: query
  });
}

// 企业销量
export function getCompanySale(query) {
  return request({
    url: '/cockpit/companySummary/sale/0',
    method: 'get',
    params: query
  });
}
// 企业销售额
export function getSalesVolume(query) {
  return request({
    url: '/cockpit/companySummary/sale/1',
    method: 'get',
    params: query
  });
}
// 企业产销趋势
export function getSaleProdTrend(query) {
  return request({
    url: '/cockpit/companySummary/saleProdTrend',
    method: 'get',
    params: query
  });
}
// 煤炭产量占比
export function getTypeCoalOutput(query) {
  return request({
    url: '/cockpit/main/typeCoalOutput',
    method: 'get',
    params: query
  });
}
// 煤炭销量占比
export function getTypeCoalSale(query) {
  return request({
    url: '/cockpit/main/typeCoalSale',
    method: 'get',
    params: query
  });
}
// 采购类型占比
export function getTypeoutputPurchase(query) {
  return request({
    url: '/cockpit/main/typeoutputPurchase',
    method: 'get',
    params: query
  });
}

// 下载销售统计单
export function exportPdfData(data) {
  return request({
    url: '/business/message/exportPdf',
    method: 'post',
    data: data
  });
}
// 场所码
export function getByCorpId(query) {
  return request({
    url: '/business/corp/getByCorpId',
    method: 'get',
    params: query
  });
}

// 获取版本信息
export function latestVersion(params) {
  return request({
    url: '/system/program/latestVersion',
    method: 'get',
    params: params
  });
}
